import ddRequest from '@/service'
import { IDataType } from '@/service/types'

enum dashboardAPI {
  categoryGoodsCount = '/category/goods/count',
  categoryGoodsSale = '/category/goods/sale',
  categoryGoodsFavor = '/category/goods/favor',
  addressGoodsSale = '/category/address/sale'
}

export function getCategoryGoodsCount() {
  return ddRequest.get<IDataType>({
    url: dashboardAPI.categoryGoodsCount
  })
}

export function getCategoryGoodsSale() {
  return ddRequest.get<IDataType>({
    url: dashboardAPI.categoryGoodsSale
  })
}

export function getCategoryGoodsFavor() {
  return ddRequest.get<IDataType>({
    url: dashboardAPI.categoryGoodsFavor
  })
}

export function getAddressGoodsSale() {
  return ddRequest.get<IDataType>({
    url: dashboardAPI.addressGoodsSale
  })
}
